package com.keray.common.service;

import com.keray.common.entity.BSService;
import com.keray.common.service.model.NameModel;

import java.io.Serializable;

/**
 * @author by keray
 * date:2021/4/29 2:00 下午
 */
public interface NameService<T extends NameModel<T, ID>, ID extends Serializable> extends BSService<T, ID> {

    default String queryName(ID id) {
        T model = getMapper().selectById(id);
        if(null != model){
            return model.getName();
        }
        return null;
    }
}
